home *** CD-ROM | disk | FTP | other *** search
- How to Use the Tutorial in Personal Pascal
- By Jinfu Chen
- Jan. 1987
-
- This is the second part of the Turbo Pascal tutorial. Please read the
- notes below if you try to compile the example programs in the package.
-
-
- PRINT-TL.BAT Batch print file for MS-DOS
- * PROG11.PAS
- * PROG12.PAS
- * PROG12A.PAS
- % PROG13.PAS
- * PROG13A.PAS
- * PROG14.PAS
- * PROG15.PAS
- & PROG15A.PAS
- & PROG15B.PAS
- $ PROG15C.PAS
- & PROG16.PAS
- @ PROG17.PAS
- README2.1ST This file
- READ.ME
- TIME.INC An include file for Turbo Pascal
- @ ST_TIME.INC Replace TIME.INC with this one when using Personal Pascal
- &$ CURSOR.PAS Add screen functions to Personal Pascal
- TL11.TXT Introduction to FUNCTIONs
- TL12.TXT FUNCTION Application - Error Detection
- % TL13.TXT Strings
- TL14.TXT Introduction to PROCEDURE
- TL15.TXT Interactive Screen Handling
- TL16.TXT REAL numbers
- TL17.TXT A timing FUNCTION
-
- Notes :
-
- * Programs can be compiled in Personal Pascal without modification
- % Personal Pascal compiler checks string size matching strickly, unlike
- Turbo Pascal. When you assign a string to a string variable, the size of
- the string variable has to be at least equal or large than the string you
- assign to. For example, the following will result compile error:
-
- PROGRAM stringerror ;
-
- VAR
- S3 : STRING[3] ;
-
- BEGIN
- S3 := 'String longer than 3' ;
- END.
-
- & The screen functions like ClrScr, ClrEol are built-in in Turbo Pascal as
- a result of poor graphic capability of IBM computers. GEM really provides
- us an excellent user interface and Personal Pascal has a GEM library to
- let people start writing programs with GEM interface easily (not that
- handy when you are 'series' with GEM though). However, there is nothing
- an IBM PC can do while ST can't do (the opposite is not true). OSS provides
- us a package with routines of screen functions. CURSOR.PAS is a file you
- can include with the example programs here to complish these screen
- functions. Just add this line before the BEGIN
- {$I CURSOR.PAS}
- where 'I' is a compiler directive for Personal Pascal. Make sure CURSOR.PAS
- is in the same dirctory(folder) of the compiler program.
- $ Add this line before PROCEDURE Print_Editing_Screen
- {$I CURSOR.PAS}
- Also change 'READ(First_Name)' in the Get_First_Name procedure to
- 'READLN(First_Name)'. Again, Personal Pascal is less sloppy than Turbo
- Pascal in string length checking and this makes sense.
- @ Replace the line
- {$I TIME.INC}
- with
- {$I ST_TIME.INC}.
- This is obvious as the function is hardware dependent. If you can find a
- friend who has Turbo Pascal and an IBM PC/XT/AT, ask him to do a benchmark,
- say run 1000 iterations and compare the result in your ST. I am sure you
- will appreciat you made a good decision, maybe you can convince your friend
- to trade in his IBM too.
-
- That's all folks. Once I get hold of the next package of tutorial, I will check
- the contents and compile the example programs then upload it. Happy Pascaling.
-